package summer_vacation.xuejiahua;

/**输入某正整形数,显示它的所有素数因子
 * Created by Administrator on 2015/8/24.
 */
public class java_14

{public static void factors(int num) {
    for (int i = 2; i <= num; i++) {
        while (num % i == 0) {
            System.out.print(i + " ");
            num /= i;
        }
        if (num < i) {
            break;
        }
    }
    System.out.println();
}
}
